package edu.buffalo.cse.cse486_586.simpledynamo.vo;

import java.io.Serializable;
import java.util.Map;

public class MessageObject implements Serializable{
	MessageType messageType;
	String key;
	String value;
	String node_id;
	String uri;
	Map<String, String> records;
	
	public String toString(){
		if(node_id != null && key != null)
			return messageType.toString() + ": ("+key+") from "+node_id;
		else
			return messageType.toString();
	}
	
	
	/**
	 * @return the records
	 */
	public Map<String, String> getRecords() {
		return records;
	}


	/**
	 * @param records the records to set
	 */
	public void setRecords(Map<String, String> records) {
		this.records = records;
	}


	/**
	 * @return the uri
	 */
	public String getUri() {
		return uri;
	}
	/**
	 * @param uri the uri to set
	 */
	public void setUri(String uri) {
		this.uri = uri;
	}
	/**
	 * @return the messageType
	 */
	public MessageType getMessageType() {
		return messageType;
	}
	/**
	 * @param messageType the messageType to set
	 */
	public void setMessageType(MessageType messageType) {
		this.messageType = messageType;
	}
	/**
	 * @return the key
	 */
	public String getKey() {
		return key;
	}
	/**
	 * @param key the key to set
	 */
	public void setKey(String key) {
		this.key = key;
	}
	/**
	 * @return the value
	 */
	public String getValue() {
		return value;
	}
	/**
	 * @param value the value to set
	 */
	public void setValue(String value) {
		this.value = value;
	}
	/**
	 * @return the node_id
	 */
	public String getNode_id() {
		return node_id;
	}
	/**
	 * @param node_id the node_id to set
	 */
	public void setNode_id(String node_id) {
		this.node_id = node_id;
	}
	
}
